//
//  KWindowViewMgr.m
//  WeCommunity
//
//  Created by mac on 2017/8/7.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "KWindowViewMgr.h"

static KWindowViewMgr * kWindowViewMgr = nil;

@interface KWindowViewMgr ()

@property (nonatomic,strong) NSMutableArray * kWindwoViewsArray;

@end

@implementation KWindowViewMgr

+(KWindowViewMgr *)shared
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        kWindowViewMgr = [[KWindowViewMgr alloc] init];
        
        kWindowViewMgr.kWindwoViewsArray = [NSMutableArray array];
    });
    return kWindowViewMgr;
}

-(void)addKWindowViews:(UIView *)view
{
    [self.kWindwoViewsArray addObject:view];
}

-(void)removeAllKWindowViews
{
    for (UIView * windowView in self.kWindwoViewsArray) {
        [windowView removeFromSuperview];
    }
}


@end
